package com.hyhy.hycloud.uaa.dto;

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.hyhy.hycloud.uaa.security.SecurityUser;
import lombok.Data;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 用户详情结果DTO
 *
 * @author Xuegui Yuan
 * @date 2018-09-18
 */
@Data
public class UserInfoResult<T> {

    @JsonUnwrapped
    private SecurityUser securityUser;

    private T details;

    /**
     * 角色列表
     */
    private List<String> roles;

    private Set<String> resourcesList;

    private Map<String, List<String>> permissionMap;

    private Boolean isSuperAdmin;

    public UserInfoResult(SecurityUser securityUser) {
        this.securityUser = securityUser;
    }
}
